const mongoose = require('mongoose');
mongoose.connect('mongodb://zg6Project:root@59.110.232.221/?authMechanism=DEFAULT&authSource=zg6Project')
const conn = mongoose.connection
conn.on('open',() => {
    console.log('数据库连接成功');
})
conn.on('error',(err) => {
    console.log('数据库连接失败,失败的原因'+err);
})
module.exports = mongoose